1. Field of the Invention
The present invention relates generally to the field of graphics processing and, more specifically, to A-Buffer compression for two-color compression format.
2. Description of the Related Art
In conventional approaches for rendering an image, a graphics processing unit (GPU) determines a color associated with each pixel of the rendered image. The color of a pixel is determined based on sample data associated with one or more polygons covering the pixel, where each sample data corresponds to a different location within the image. For example, for a pixel that is covered by first and second objects and includes four sample data, one of the sample data may reflect the color of the first object, and three of the sample data may reflect the color of the second object. Color information from each of the four sample data may contribute to the color of the pixel using well-known techniques that improve image quality by, among other things, reducing edge artifacts in images. An example of such a technique is multi-sample anti-aliasing.
GPUs often increase the efficiency of operations such as multi-sample anti-aliasing by using a variety of compression techniques to reduce memory bandwidth and computational load. For example, if each of the four samples included in a particular pixel has one of two colors, then the GPU may determine that the pixel is compressible and may represent all four samples (i.e., the pixel) using the color information needed to represent only two colors. Further, the GPU groups proximally located pixels into an image tile for efficient processing. If all of the pixels included in an image tile are compressible, then the GPU determines that the image tile is compressible and represents the image tile using a reduced amount of color information. Reducing the data used to represent the pixels and image tiles reduces the memory bandwidth used when accessing the pixels and tiles in memory.
To manage a large amount of sample data, the GPU may generate an A-Buffer—a memory structure that maintains sample data associated with each polygon that intersects the pixels of an image frame being rendered. Traditionally, an A-Buffer stores linked lists of the sample data, where each linked list is associated with different sample data corresponding to a different pixel. One drawback to storing sample data in an A-buffer is that compression techniques that are often implemented by GPUs to reduce memory bandwidth and increase efficiency cannot be supported in the A-Buffer due to the discrete nature of the A-Buffer.
As the foregoing illustrates, what is needed in the art is a more effective technique for creating and accessing an A-Buffer that can stored compressed sample data.